var timer;
Page({
  data: {
    num:3
  },
  onLoad() {
    this.reduceNum()
  },
  reduceNum() {
    timer = setTimeout(() => {
      var num = this.data.num;
      num--;
      if (num >= 0) {
        this.setData({
          num
        })
        this.reduceNum();
      } else {
        wx.navigateTo({
          url: '/pages/music/music'
        });
      }
      console.log(timer)
    },1000)
  },
  handleClick() {
    clearTimeout(timer);
    wx.navigateTo({
      url: '/pages/music/music'
    });
  }
})